/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.toools.gwt.wmc.client.container;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import java.util.Collection;
import org.toools.gwt.wmc.jpa.Container;

/**
 *
 * @author Manuel
 */
public interface ContainerService extends RemoteService {

    public static class Util {
		private static ContainerServiceAsync instance;
		public static ContainerServiceAsync getInstance(){
			if (instance == null) {
				instance = (ContainerServiceAsync) GWT.create(ContainerService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getHostPageBaseURL() + "WMC/ContainerService");
			}
			return instance;
		}
	}

    Container getContainerByID( Integer id );
    Collection<Container> getContainers();

    Container create( Container c );
    Boolean delete( Container c );
    Boolean update( Container c );


}
